package sjtu.sonnet.LDAPModule.RBAC.model.role;

import java.util.Vector;

import sjtu.sonnet.LDAPModule.RBAC.model.permission.iPermission;

public class Role implements iRole {

	public Role() {

	}

	public Role(String name) {
		this.name = name;
		this.description = "";
		this.Permissions = new Vector<iPermission>();
	}

	public Role(String name, String description) {
		this.name = name;
		this.description = description;
	}

	public void addPermissions(iPermission permission) {
		this.Permissions.add(permission);
	}

	public iPermission getPermissionAt(int i) {
		return this.Permissions.get(i);
	}

	public Vector<iPermission> getPermissions() {
		return this.Permissions;
	}

	public void setPermissions(Vector<iPermission> permissions) {
		this.Permissions = permissions;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getDescription() {
		return description;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	private Vector<iPermission> Permissions = null;

	private String description = null;

	private String name = null;
}
